home *** CD-ROM | disk | FTP | other *** search
- DefInt A-Z
- ' this is an example of simple btrieve data file that will be created if it does not exist
- ' the visual basic program show an example of a simple form for entering names and addresses.
- ' the program require the btrieve for windows dll you may download from NOVLIB but not distribute
- ' written by j highsmith, RRT Softcare Corporation Griffin, GA 1404-412-0827 FAX, Voice or Message
-
- Rem Operation codes
-
- Global Const bopen = 0
- Global Const bclose = 1
- Global Const binsert = 2
- Global Const bupdate = 3
- Global Const bdelete = 4
- Global Const bgetequal = 5
- Global Const bgetnext = 6
- Global Const bprevious = 7
- Global Const bgetgreater = 8
- Global Const bgetgreaterorequal = 9
- Global Const bGetLessThan = 10
- Global Const bgetLessThanOrEqual = 11
- Global Const bfirst = 12
- Global Const blast = 13
- Global Const bcreatenew = 14
- Global Const bstat = 15
- Global Const bstop = 25
- Global Const breset = 28
- Global Const bcreateSupIndex = 31
- Global Const bdropSupIndex = 32
- Global Const bxGetNext = 36
- Global Const bxinsert = 40
-
- Rem Key Flag%
-
- Global Const dup% = 1
- Global Const modifiable% = 2
- Global Const bin% = 4
- Global Const nul% = 8
- Global Const segment% = 16
- Global Const seq% = 32
- Global Const dec% = 64
- Global Const sup% = 128
-
- Global Const exttype% = 256
- Global Const manual% = 512
- Global Const bstring% = 0
- Global Const binteger% = 1
- Global Const bfloat% = 2
- Global Const bdate% = 3
- Global Const btime% = 4
- Global Const bdecimal% = 5
- Global Const bnumeric% = 8
- Global Const bzstring% = 11
- Global Const bautoinc% = 15
-
- Global Const MAXKEYS% = 9
-
- Type PosBlk
- PBelements As String * 128
- End Type
-
- Type KeyBuffer
- filename As String * 64
- End Type
-
-
- Declare Function wbtrvinit Lib "wbtrcall.dll" (init As Any) As Integer
- Declare Function wbtrvstop Lib "wbtrcall.dll" () As Integer
- Declare Function btrcall Lib "wbtrcall.dll" (ByVal op%, Pb As PosBlk, Db As Any, Dl As Integer, Kb As Any, ByVal Kl%, ByVal Kn%) As Integer
-
- Declare Function StretchBlt Lib "gdi" (ByVal destdc%, ByVal destx%, ByVal desty%, ByVal destwd%, ByVal destht%, ByVal srcdc%, ByVal srcx%, ByVal srcy%, ByVal srcwd%, ByVal srcht%, ByVal rop&) As Integer
- Global Const srccopy = &HCC0020
- Global Const DSTINVERT = &H550009
- Global Const SRCERASE = &H440328
- Global Const BLACKNESSsrc = &H42
- Global Const notsrcerase = &H1100A6
- Global Const notsrccopy = &H330008
- Global Const patinvert = &H5A0049
- Global Const srcinvert = &O660046
- Global Const srcand = &H8800C6
- Global Const mergepaint = &HBB0226
- Global Const mergecopy = &HC00CA
- Global Const scrpaint = &HEE0086
- Global Const patcopy = &HF00021
- Global Const patpaint = &HFB0A09
- Global Const whitenessSrc = &HFF0062
-
-
- Type CustomerRecord
- CustomerIDNumber As String * 10
- FirstName As String * 20
- Lastname As String * 20
- initial As String * 1
- company As String * 30
- address As String * 30
- city As String * 20
- state As String * 2
- zip As String * 10
- telephone As String * 12
- End Type
-
- Type FileSpecifications
-
- RecLen As Integer
- PageSize As Integer
- IndxCnt As Integer
- NotUsed As String * 4
- FileFlags As Integer
- Reserved As String * 2
- Allocation As Integer
-
- KeyPosition0 As Integer
- KeyLength0 As Integer
- KeyFlags0 As Integer
- KeyTot0 As Long
- KeyType0 As Integer
- Reserved0 As String * 4
-
- KeyPosition1 As Integer
- KeyLength1 As Integer
- KeyFlags1 As Integer
- KeyTot1 As Long
- KeyType1 As Integer
- Reserved1 As String * 4
-
- KeyPosition2 As Integer
- KeyLength2 As Integer
- KeyFlags2 As Integer
- KeyTot2 As Long
- KeyType2 As Integer
- Reserved2 As String * 4
-
- KeyPosition3 As Integer
- KeyLength3 As Integer
- KeyFlags3 As Integer
- KeyTot3 As Long
- KeyType3 As Integer
- Reserved3 As String * 4
-
- KeyPosition4 As Integer
- KeyLength4 As Integer
- KeyFlags4 As Integer
- KeyTot4 As Long
- KeyType4 As Integer
- Reserved4 As String * 4
-
- KeyPosition5 As Integer
- KeyLength5 As Integer
- KeyFlags5 As Integer
- KeyTot5 As Long
- KeyType5 As Integer
- Reserved5 As String * 4
-
- KeyPosition6 As Integer
- KeyLength6 As Integer
- KeyFlags6 As Integer
- KeyTot6 As Long
- KeyType6 As Integer
- Reserved6 As String * 4
-
-
- End Type
-
- Global init As String * 64
-
- Global PositionBlock As PosBlk
- Global KeyBuf As KeyBuffer
- Global FileBuf As FileSpecifications
- Global DataBuf As CustomerRecord
-
- Global Const SubFields = 10
- Global KeyNum As Integer
-
-